1. Field of the Invention
The present invention relates to a network device in a packet switched network and more particularly to a method of scheduling packets in multiple queues to guarantee quality of service.
2. Description of the Related Art
A packet switched network may include one or more network devices, such as a Ethernet switching chip, each of which includes several modules that are used to process information that is transmitted through the device. Specifically, the device includes an ingress module, a Memory Management Unit (MMU) and an egress module. The ingress module includes switching functionality for determining to which destination port a packet should be directed. The MMU is used for storing packet information and performing resource checks. The egress module is used for performing packet modification and for transmitting the packet to at least one appropriate destination port. One of the ports on the device may be a CPU port that enables the device to send and receive information to and from external switching/routing control entities or CPUs.
As packets enter the device from multiple ports, they are forwarded to the ingress module where switching and other processing are performed on the packets. Thereafter, the packets are transmitted to one or more destination ports through the MMU and the egress module. The MMU enables sharing of packet buffer among different ports while providing resource guarantees for every ingress port, egress port and class of service queue. According to a current switching system architecture, eight class of service queues are associated with each egress port. To ensure bandwidth guarantees across the ports and queues, the device includes a scheduler that provides arbitration across the class of service queues to ensure minimum and maximum bandwidth guarantees. One implementation for ensuring bandwidth guarantees across the queues associated with each port is to assign a fixed portion of the total bandwidth for the port to each queue. As such, a queue that is associated with a class of service with a high priority may be assigned a greater fixed portion than a queue that is associated with a lower priority class of service. The scheduler then processes packets in each queue, for example in a round robin fashion. This implementation is inflexible. For example, when a queue is idle, the bandwidth assigned to that queue is unused even if another queue requires more bandwidth than the amount allocated to it. As such packets may be dropped on one queue that is exceeding its allocated bandwidth while the bandwidth of an idle queue remains unused.